package com.briup.ch01;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * @author yuxi
 * @version 1.0
 * @date 2025/11/5
 * @Description:
 */
public class JUnitTest {
    public static void main(String[] args) {
        System.out.println("main");
        /*JUnitTest test = new JUnitTest();
        test.testAdd();*/
    }
    public int add(int a,int b){
        return a+b;
    }
    @Test
    public void test() {
        System.out.println("测试");
    }
    @Test
    public void testAdd() {
        int result = add(2,3);
        System.out.println("2+3="+result);
    }
    @Before
    public void before(){
        //初始化操作
        System.out.println("before");
    }
    @After
    public void after(){
        //释放资源
        System.out.println("after");
    }
}
